﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Data.Common;
using System.Linq;
using System.Text;
using Microsoft.Practices.EnterpriseLibrary.Data;

namespace MINERP.DAL.Statistics
{
    public class OutShopBillDAL
    {
        public DataSet GetOutShopProduct(int  inOutShopId, DateTime inStartTime, DateTime inEndTime,int inProductStatus,int inPayStatus)
        {
            Database db = DatabaseFactory.CreateDatabase();
            DbCommand dbCommand = db.GetStoredProcCommand("ProcOutShopProduct");
            dbCommand.CommandTimeout =600;
            db.AddInParameter(dbCommand, "@OutShopID", DbType.Int32, inOutShopId);
            db.AddInParameter(dbCommand, "@StartTime", DbType.DateTime, inStartTime);
            db.AddInParameter(dbCommand, "@EndTime", DbType.DateTime, inEndTime);
            db.AddInParameter(dbCommand, "@ProductStatus", DbType.Int32, inProductStatus);
            db.AddInParameter(dbCommand, "@PayStatus", DbType.Int32, inPayStatus);
            DataSet set = db.ExecuteDataSet(dbCommand);
            return set;
        }
    }
}
